<div class="text-left col-left form-horizontal event-item clearfix box">
<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'member-study-form'.$model->id,
    'enableClientValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    ),
)); 
    $arraySta = array();
    for ($i=1950; $i < 2020 ; $i++) { 
        $arraySta[$i] = $i;
    }
?>

    <?php echo $form->errorSummary($model); ?>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">Học vấn</label>
        <div class="col-sm-8">
            <?php echo $form->textField($model,'title',array('class'=>'form-control','size'=>60,'maxlength'=>255,'placeholder'=>"Trình độ học vấn ...")); ?>
            <?php echo $form->error($model,'title'); ?>
        </div>
    </div>

    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">Nơi học</label>
        <div class="col-sm-8">
        <?php echo $form->textField($model,'locate',array('class'=>'form-control','size'=>60,'maxlength'=>255,'placeholder'=>"Nơi học tập ...")); ?>
        <?php echo $form->error($model,'locate'); ?>
        </div>
    </div>

    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">Thời gian</label>
        <div class="col-sm-3">
            <?php echo $form->dropDownList($model,'startyear',$arraySta,array("class"=>"form-control",'options'=>array('2013'=>array('selected'=>'selected')))); ?>
        </div>
        <div class="col-sm-3">
            <?php echo $form->dropDownList($model,'finishyear',$arraySta,array("class"=>"form-control",'options'=>array('2013'=>array('selected'=>'selected')))); ?>
        </div>
    </div>

    <div class="row buttons">
        <?php 
        $idupdate = "use-input-update".$model->id;
        echo CHtml::ajaxSubmitButton("Chỉnh sửa", Yii::app()->createUrl('/Users/profiles/updatestudy',array('id'=>$model->id)),
                    array(
                        'type'=>'POST',
                        'data'=> 'js:$("#member-study-form'.$model->id.'").serialize()',
                        'dataType'=> 'json',
                        'success'=>'js:function(data){
                            $("#use-add-study").hide();
                            $("#use-view-study'.$model->id.'").html(data.view);
                        }'
                    ),
                    array('class'=>"btn btn-primary",'id'=>$idupdate,'style'=>'margin-left: 170px;'));
                ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->